package org.itboys.core.entity.mongo;

import org.itboys.mongodb.entity.BaseMongoEntity;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;

/**
 * @Author：贾琦磊
 * @Date：2018/8/3
 * @Description：仓库人员实体类
 */
@Entity(value = "SundayUser",noClassnameStored = true)
public class SundayUser extends BaseMongoEntity{

    /**
     * 登录账号加唯一索引
     */
    @Indexed(unique=true)
    private String userName;
    /**
     * 用户密码,MD5加密
     */
    private String password;
    /**
     * 真实姓名
     */
    private String realName;
    /**
     * 昵称
     */
    private String nickName;
    /**
     * 手机号
     */
    private String mobile;
    /**
     * 用户类型暂时分为两种
     * 1--仓库管理员
     * 2--配送员
     */
    private Integer type;
    /**
     * 头像
     */
    private String image;
    /**
     * 性别
     */
    private Integer sex;
    /**
     * 个人简介
     */
    private String desc;
    /**
     * 部门id
     */
    private Long orgId;
    /**
     * 部门，保留字段
     */
    private String orgName;
    /**
     * 1--在职，新建时默认为在职状态
     * 2--离职，
     * 3--停职。
     */
    private Integer status;

    /**
     * 用户所属仓库
     */
    private Long storeId;
    /**
     * 仓库名称
     */
    private String storeName;
    public SundayUser(){}
    public SundayUser(String userName,String password,String realName, String nickName, String mobile, Integer type,
                      Integer sex, String desc, Long orgId, String orgName, Integer status,Long storeId){
        this.userName=userName;
        this.password=password;
        this.realName=realName;
        this.nickName=nickName;
        this.mobile=mobile;
        this.type=type;
        this.sex=sex;
        this.desc=desc;
        this.orgId=orgId;
        this.orgName=orgName;
        this.status=status;
        this.storeId=storeId;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }


    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }


    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }


    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("SundayUser{");
        sb.append("userName='").append(userName).append('\'');
        sb.append(", password='").append(password).append('\'');
        sb.append(", realName='").append(realName).append('\'');
        sb.append(", nickName='").append(nickName).append('\'');
        sb.append(", mobile='").append(mobile).append('\'');
        sb.append(", type=").append(type);
        sb.append(", image='").append(image).append('\'');
        sb.append(", sex=").append(sex);
        sb.append(", desc='").append(desc).append('\'');
        sb.append(", orgId=").append(orgId);
        sb.append(", orgName='").append(orgName).append('\'');
        sb.append(", status=").append(status);
        sb.append(", storeId=").append(storeId);
        sb.append('}');
        return sb.toString();
    }
}
